package a05op_interface.demo1;

public class Test {
    public static void main(String[] args) {
        Dog dog = new Dog("小黑",2);
        dog.eat();
        dog.swim();
        System.out.println(dog.toString());
        System.out.println("----------------------------------");

        Rabbit rabbit = new Rabbit("小白", 1);
        rabbit.eat();
        System.out.println(rabbit.toString());
    }
}
